Skip to content

feat(cli): add --local as the name for local mode, keep --anonymous as its alias - #738

Merged
aibex-agent[bot] merged 2 commits into
mainfrom
aibex/t_DHfsCMj9aDuylF1kViUo6XmN
Dec 2, 2026
Merged

aibex-agent[bot] merged 2 commits into
mainfrom
aibex/t_DHfsCMj9aDuylF1kViUo6XmN

Conversation

@aibex-agent

@aibex-agent aibex-agent Bot commented Dec 2, 2026

Copy link
Copy Markdown

Follow-up from #732: --anonymous reads as a statement about identity, but what it selects is a mode (run on this machine, no Taskless API call, no auth lookup, no verification). --local says that.

What changes

  • Every command that accepted --anonymous (agent, auth login/logout, check, info, init, update, rule create/improve/meta/delete) now accepts --local, defined once in src/util/local-flag.ts.
  • --anonymous stays as an alias everywhere, so existing scripts, CI configs, hooks and installed recipes keep working. --help lists both.
  • Printed text names --local: the check not-verified notice, the auth login rejection (now "auth commands cannot run in local mode (--local)"), the rule improve pointer, info's auth line, the agent index and recipe fetch lines.
  • Recipes and the Taskless skill use --local; the skill notes the alias.

Kept as-is, deliberately

  • info --json still reports authState: "anonymous": a machine contract, not a flag name.
  • The @taskless/cli/prompts option anonymous and the <topic>.anonymous.md variant filename: internal/exported names, renaming them would break the export for nothing.
  • The alias is a second citty arg rather than citty's alias, because citty renders aliases with one dash (-anonymous), which would parse as -a -n -o ….

Notes for review

  • check -l is --preserve-logs, not --local. Unchanged, but worth knowing now that --local exists.
  • OpenSpec: the cli flag requirement is replaced (REMOVED + ADDED, since the title changes) by one that makes the two spellings equivalent everywhere, so other specs' --anonymous mentions hold for --local without restating each. cli-auth and cli-check MODIFIED blocks restate in full; the archive was dry-run checked for dropped scenarios. Archived in this PR.
  • Changeset: patch (0.y.z, nothing removed).

Refs #732

…s its alias

--local names what the flag selects: run on this machine with no Taskless
API call, no auth lookup and no verification. --anonymous keeps working on
every command so scripts, CI configs and installed recipes need no change.
Printed text, recipes and the skill now name --local.
@aibex-agent

aibex-agent Bot commented Dec 2, 2026

Copy link
Copy Markdown
Author

@claude /review

@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @aibex-agent[bot]'s task in 1m 48s —— View job


Review complete

Review mode: incremental — read 0 prior review thread(s) before reviewing. .prior-review.json contains only the triggering @claude /review comment — no prior reviews, review threads, or other comments exist on this PR, so this is the first review and the whole diff was assessed as new.

  • Read prior review data
  • Fetch PR diff and changed files
  • Review core flag logic (local-flag.ts, command files)
  • Review OpenSpec changes
  • Review tests
  • Post findings

Findings: none. I read the full diff (38 files) plus the current contents of local-flag.ts, agent.ts, auth.ts, check.ts, rules.ts, plan-check.ts, and the OpenSpec archive/spec files.

What I checked specifically:

  • localModeFlags/isLocalMode (src/util/local-flag.ts): clean, minimal, correctly typed against citty's ArgsDef. The rationale for declaring --anonymous as a second arg instead of a citty alias (which would render as a single-dash -anonymous and mis-parse) is sound and documented.
  • Call-site migration: grepped for any leftover direct args.anonymous reads outside local-flag.ts itself — none found. Every command (agent, auth login/logout, check, info, init, update, rule create/improve/meta/delete) consistently uses isLocalMode(args) where behavior is gated, so --anonymous and --local are genuinely equivalent everywhere, not just in some commands.
  • No flag key collisions: localModeFlags(...) is spread once per command's args object; no duplicate local/anonymous keys.
  • User-facing text: notices, errors, recipe pointers, and the agent index consistently say --local now, while --anonymous's own --help description is intentionally generic ("Alias of --local, its original name") — a reasonable simplification since the alias just needs to point at --local.
  • Internal-only names left alone on purpose: info --json's authState: "anonymous", the plan-check.ts/scanProject internal anonymous option key, and the <topic>.anonymous.md filename/@taskless/cli/prompts anonymous option are unchanged, matching the PR description's explicit "kept as-is" list — these are machine contracts/internal names, not flag spellings.
  • OpenSpec: the cli spec's REMOVED/ADDED pair and the cli-auth/cli-check MODIFIED blocks are byte-for-byte consistent with the archived change's versions, and the archived proposal/tasks accurately describe the shipped diff.
  • Tests: local-flag.test.ts (renamed from anonymous-flag.test.ts) covers the full per-command matrix under --local, plus a dedicated --anonymous stays an alias of --local suite exercising info, auth login, rule create/improve, and a --help check that both flags are listed and the alias never renders as single-dash. agent-extensions.test.ts and runtime-check.test.ts were updated to it.each(["--local", "--anonymous"]) where it matters (variant lookup, check's unverified notice), which is good — it directly proves the alias isn't just parsed but actually drives the same behavior.

Only trivial, non-functional nits spotted (not worth blocking on): the --help/doc Markdown tables in agent/auth.md and agent/info.md lost a bit of column-padding alignment when text got longer (e.g. auth.md's INVALID_INPUT row, info.md's anonymous row) — cosmetic only, since GFM tables render fine regardless of source padding.

No correctness, security, or test-coverage issues found.

@aibex-agent
aibex-agent Bot merged commit 7b8fc9f into main Dec 2, 2026
11 checks passed
@aibex-agent
aibex-agent Bot deleted the aibex/t_DHfsCMj9aDuylF1kViUo6XmN branch December 2, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant